package com.server.rule;

import com.server.rule.config.RuleConfiguration;
import com.server.rule.engine.RuleBootStrap;

/**
 * Description: This is a sample class.
 * @Author Simon
 */
public class RuleEngineLauncher {

    private static RuleBootStrap ruleBootStrap;

    public static void startRuleEngineService(){
        RuleConfiguration ruleConfiguration = initRuleConfiguration();
        initRuleBootStrap(ruleConfiguration);
    }

    private static void initRuleBootStrap(RuleConfiguration ruleConfiguration) {
        ruleBootStrap = new RuleBootStrap();
        ruleBootStrap.setConfiguration(ruleConfiguration);
    }

    static RuleConfiguration initRuleConfiguration(){
        RuleConfiguration ruleConfiguration = new RuleConfiguration();
        ruleConfiguration.initConfiguration();
        return ruleConfiguration;
    }

}
